<template>
  <div class="index">
    <el-container style="border: 1px solid #eee">
      <el-aside style="width: 201px;">
        <NavMenu></NavMenu>
      </el-aside>
      <el-container>
<!--        <el-header style="text-align: right; font-size: 12px; height: 40px;">-->
<!--          <HeadMenu></HeadMenu>-->
<!--        </el-header>-->
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
  // import bus from './common/bus';
  import NavMenu from "./NavMenu";
  import HeadMenu from "./HeadMenu";
  var echarts = require('echarts');

  export default {
    components: {HeadMenu, NavMenu},
    data(){
      return{
      }
    },
    computed: {
      username() {
        return this.$store.state.userinfo.username
      },
      nowhref() {
        return window.location.origin
      },
      onRoutes(){
          return this.$route.path.replace('/','');
      }
    },
    methods: {
      commond(com) {
        if(com == 'logout') {
          sessionStorage.removeItem('userinfo')
          // window.location.href = this.nowhref+'/#/login'
          this.$router.push('/login')
        } else if(com == 'personal') {
          this.$router.push('/personal')
        }
      }
    }
  };
</script>

<style>
    .el-container header.el-header {
    background-color: rgba(117, 175, 250, 0.5);
    color: #fff;
    line-height: 40px;
  }

  body,
  #app,
  .index {
    height: 100%;
  }

  .el-container {
    height: 100%;
  }

  .el-aside {
    color: #333;
    background-color: #fff;
    border-right: solid 1px #e6e6e6;
  }

  .el-menu {
    border-right: none;
  }

  .home {
    text-align: center;
    background-color:#fff;
    font-size: 26px;
    color:#409EFF;
    height: 80px;
  }

  .home span {
    line-height: 80px;
  }

  .home:hover{
    background-color: #ecf5ff;
  }

  .el-header {
    background-color: #ecf5ff;
  }

</style>
